//
//  NSBundle+Y2Common.m
//  Y2Common
//
//  Created by MacPro on 2021/1/20.
//

#import "NSBundle+Y2Common.h"

@implementation NSBundle (Y2Common)
+ (NSBundle *)y2FrameworkBundleWithName:(NSString *)name {
    return [self y2FrameworkBundleWithFrameworkName:name bundleName:name];
}

+ (NSBundle *)y2FrameworkBundleWithFrameworkName:(NSString *)frameworkName bundleName:(NSString *)bundleName {
    NSString *bundlePath = [[[NSBundle mainBundle] pathForResource:@"Frameworks" ofType:@""] stringByAppendingFormat:@"/%@.framework/%@.bundle", frameworkName, bundleName];
    NSBundle *bundle = [NSBundle bundleWithPath:bundlePath];
    return bundle;
}
@end
